﻿@{
    ViewBag.Title = "CreatePi";
    Layout = "~/Views/Shared/_Layout.cshtml";
    <script src="~/Scripts/gbh/CreatePi.js"></script>
}

<h2>CreatePi</h2>
<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'east',split:true" title="Draft PI Selected" style="width: 45%;">
        <table id="ExportAll" title="" class="easyui-datagrid" style="width: 100%; height: 400px;"
            rownumbers="true" toolbar="#toolbar" fitcolumns="true" singleselect="true">
            <thead>
                <tr>
                    <th field="BranchCode" width="50px" align="center">Branch
                    </th>
                    <th field="BranchName" editor="text" width="100px" align="center">Branch
                    </th>
                    <th field="FileName" editor="text" width="150px" align="center">File Name
                    </th>
                    <th field="ExportDate" editor="text" width="50px" align="center">Create Date
                    </th>
                    <th field="Id" editor="text" width="50px" align="center" formatter="formatExportPI">Export
                    </th>
                </tr>
            </thead>
        </table>
    </div>
    <div data-options="region:'center',title:'PI List',iconCls:'icon-ok'" style="width: 45%;">

        <table id="DraftAll" title="" class="easyui-datagrid" style="width: 100%; height: 400px;"
            rownumbers="true" toolbar="#toolbar" fitcolumns="true" singleselect="true">
            <thead>
                <tr>
                    <th field="mbranchno" width="100" align="center">Branch No.
                    </th>
                    <th field="mprovdesc" editor="text" width="100" align="center">Branch Name
                    </th>
                    <th field="mprovtrans" editor="text" width="50px" align="center">Group
                    </th>
                    <th field="mprovtrans1" editor="text" width="50px" align="center" formatter="formatViewDraft">View
                    </th>
                    <th field="mprovtrans2" editor="text" width="50px" align="center" formatter="formatCreateExport">PI
                    </th>
                </tr>
            </thead>
        </table>
    </div>

</div>

<div id="draftDetails" class="easyui-dialog" style="width: 1000px; height: 500px; padding: 10px 20px" title="รายละเอียด Draft PI"
    closed="true" data-options="resizable:true,modal:true" buttons="#dlg-buttons">

    <table id="DraftDetails" class="easyui-datagrid" style="width: 100%; height: 400px;"
        rownumbers="true" toolbar="#toolbar" fitcolumns="true" singleselect="true">
        <thead>
            <tr>
                <th field="branchCode" width="200" align="center">รหัส Branch
                </th>
                <th field="branchName" width="300" align="center">ชื่อ Branch
                </th>
                <th field="productId" width="300" align="center">รหัสสินค้า
                </th>
                <th field="productName" width="100" align="center">ชื่อสินค้า
                </th>
                <th field="nawaProductId" width="100" align="center">รหัสสินค้าผู้จำหน่าย
                </th>
                <th field="nawaProductName" width="100" align="center">ชื่อสินค้าผู้จำหน่าย
                </th>
                <th field="type" width="100" align="center">G
                </th>
                <th field="qty" width="100" align="center">จำนวน
                </th>
            </tr>
        </thead>
    </table>
</div>
<div id="dlg-buttons">
    <a href="#" class="easyui-linkbutton" iconcls="icon-close" onclick="javascript:jQuery('#draftDetails').dialog('close')">Close</a>
</div>
